package com.zc.feignservice;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;

@Component
// 这里的fallback优先级最高
@FeignClient(value = "cloud-payment",contextId = "2", fallback = PaymentHystrixServiceImpl.class)
public interface PaymentHystrixService {
    @GetMapping("/hystrix/ok")
    public String paymentInfoOk();

    @GetMapping("/hystrix/timeout")
    public String paymentTimeOut();
}
